package core.models;

import java.io.ObjectOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.Serializable;

import core.Runner;

public class Save implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 11;
	
	

	
	public static void saveToDisk(String name_of_file, Runner runner)
	{
		ObjectOutputStream output = null;
		try{
			FileOutputStream fout= new FileOutputStream(name_of_file);// = new FileOutputStream();
			output = new ObjectOutputStream(fout);
			output.writeObject(runner);
		}
		catch(IOException fe)
		{
			System.out.println(fe);
		}
		finally
		{
			try 
			{
				output.close();
			} 
			catch (IOException e) 
			{
				e.printStackTrace();
			}
		}
	}
	
	public void formatFile()
	{
		
	}
}
